******************************************************************************
*                                                                            *
* Abigail S. Post & Paromita Sen		                                     *
* "Why Can't a Woman Be More Like a Man? Female Leaders in Crisis Bargaining"*
* International Interactions    		  		                             *
*                                                                            *
******************************************************************************


* Purpose
* This is a Stata replication file for "Why Can't a Woman Be More Like a Man?." It replicates the regressions, charts, and robustness checks described in the original article and in the document "PostSen_GenderLeadership_Appendices.pdf".
*
* 
* Requirements
* 1. This file requires the "estout" Stata package.  It can be installed by typing "ssc install estout" (without quotes) into the Stata command window, or by visiting <http://repec.org/bocode/e/estout/installation.html>.
* 2. This file requires the "coefplot" Stata package.  It can be installed by typing "ssc install coefplot" (without quotes) into the Stata command window, or by visiting <http://repec.sowi.unibe.ch/stata/coefplot/>.
* 3. This file requires the Stata datasets "PostSen-GenderLeadership-II.dta".
*
* Version
* Last updated: August 24, 2019

use PostSen-GenderLeadership-II.dta, clear

set more off

***** TABLE 1 *****
eststo est1: logit recip female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance if numa==1 & numb==1, cluster(ccodea)

eststo est2: logit recip female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if numa==1, cluster(ccodea)

eststo est3: ologit hostlev_b female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance if numa==1 & numb==1, cluster(ccodea)

eststo est4: ologit hostlev_b female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance if numa==1, cluster(ccodea)

eststo est5: ologit hostlev_a female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance if numa==1 & numb==1, cluster(ccodea)

eststo est6: ologit hostlev_a female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance if numa==1, cluster(ccodea)

esttab est1 est2 est3 est4 est5 est6, se(3) pr2 b(3) star(* 0.10 ** 0.05 *** 0.01)
esttab est1 est2 est3 est4 est5 est6 using table.tex, label replace se(3) pr2 b(3) star({\star} 0.10 {\star\star} 0.05 {\star\star\star} 0.01) fragment nomtitles nodepvars nonumbers alignment(D{.}{.}{3})


***** Figure 1 *****
generate hostlev_b2 = 0 if hostlev_b==1
replace hostlev_b2 = 1 if hostlev_b == 2 | hostlev_b==3
replace hostlev_b2 = 2 if hostlev_b > 3
ologit hostlev_b2 i.female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if year>1979 & numa==1, cluster(ccodea)
margins, dydx(female)


quietly eststo gender: ologit hostlev_b2 i.female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if year>1979 & numa==1, cluster(ccodea)
esttab gender, se(3) pr2 b(3) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) mtitles("")
quietly margins, dydx(female) post
quietly estimates store gender

coefplot (gender, pstyle(p3) ciopts(lcolor(black) lwidth(vthin))), ///
drop(_cons) ysize(1) xsize(1) xline(0) msymbol(circle) msize(small) ///
xscale(range(-.3 .3)) xlabel(-.4 "-40" -.3 "-30" -.2 "-20" -.1 "-10" 0 .1 "+10" .2 "+20" .3 "+30" .4 "+40",labsize(vsmall)) ///
ylabel(,labsize(small)) nooffsets ciopts(color(gs8) recast(rcap) msize(small)) mcolor(gs5) ///
xtitle ("Target Hostility", size(small))



***** Appendix D: Additional Results *****

***** Table S1-2 *****

*Model 1
logit recip ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if numa==1 & numb==1, cluster(ccodea)
estat ic

logit recip female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if numa==1 & numb==1, cluster(ccodea)
estat ic

*Model 2
logit recip ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if numa==1, cluster(ccodea)
estat ic

logit recip female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if numa==1, cluster(ccodea)
estat ic

*Model 3
ologit hostlev_b ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if numa==1 & numb==1, cluster(ccodea)
estat ic

ologit hostlev_b female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if numa==1 & numb==1, cluster(ccodea)
estat ic

*Model 4
ologit hostlev_b ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if numa==1, cluster(ccodea)
estat ic

ologit hostlev_b female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if numa==1, cluster(ccodea)
estat ic

*Model 5
ologit hostlev_a ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if numa==1 & numb==1, cluster(ccodea)
estat ic

ologit hostlev_a female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if numa==1 & numb==1, cluster(ccodea)
estat ic

*Model 6
ologit hostlev_a ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if numa==1, cluster(ccodea)
estat ic

ologit hostlev_a female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance coalition if numa==1, cluster(ccodea)
estat ic


***** Appendix E: Hostility Levels *****

***** Table S1-3 *****

ologit hostlev_b female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance if numa==1, cluster(ccodea)
margins, dydx(female) predict(outcome(1))
margins, dydx(female) predict(outcome(2))
margins, dydx(female) predict(outcome(3))
margins, dydx(female) predict(outcome(4))
margins, dydx(female) predict(outcome(5))

***** Table S1-4 *****

ologit hostlev_a female ratio nuclear contiguity i.revision3 autocracy autocracy_b alliance if numa==1, cluster(ccodea)
margins, dydx(female) predict(outcome(2))
margins, dydx(female) predict(outcome(3))
margins, dydx(female) predict(outcome(4))
margins, dydx(female) predict(outcome(5))
